//
//  GuideTextCell.m
//  ZhiHuiLiJiang
//
//  Created by work on 2018/11/15.
//  Copyright © 2018年 王雅鹏. All rights reserved.
//已废弃

#import "GuideTextCell.h"

@implementation GuideTextCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self addView];
    }
    return self;
}

-(void)addView{
    
    [self.contentView addSubview:self.contentLabel];
    [self.contentView addSubview:self.conteryLabel];
    [self.contentView addSubview:self.numLabel];
    [self.contentView addSubview:self.timeLabel];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(18);
        make.left.equalTo(self.contentView.mas_left).offset(10);
        make.right.equalTo(self.contentView.mas_right).offset(-10);

    }];
    
    [self.conteryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.contentView.mas_left).offset(10);
        
    }];  [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.conteryLabel.mas_right).offset(10);

    }];  [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.numLabel.mas_right).offset(10);
    }];
}
-(UILabel *)contentLabel{
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc]init];
        _contentLabel.textColor = [UIColor blackColor];
        _contentLabel.font = H16;
        _contentLabel.numberOfLines = 2;
        _contentLabel.textColor = RGBA(52, 52, 52, 1);
        [_contentLabel sizeToFit];
    }
    return _contentLabel;
}
-(UILabel *)conteryLabel{
    if (!_conteryLabel) {
        _conteryLabel = [[UILabel alloc]init];
        _conteryLabel.textColor = [UIColor blackColor];
        _conteryLabel.font = H13;
        _conteryLabel.textColor = RGBA(152, 152, 152, 1);

        [_conteryLabel sizeToFit];

    }
    return _conteryLabel;
}

-(UILabel *)numLabel{
    if (!_numLabel) {
        _numLabel = [[UILabel alloc]init];
        _numLabel.textColor = [UIColor blackColor];
        _numLabel.font = H13;
        _numLabel.textColor = RGBA(152, 152, 152, 1);
        [_numLabel sizeToFit];

    }
    return _numLabel;
}
-(UILabel *)timeLabel{
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc]init];
        _timeLabel.textColor = [UIColor blackColor];
        _timeLabel.textColor = RGBA(152, 152, 152, 1);
        _timeLabel.font = H13;
        [_timeLabel sizeToFit];

    }
    return _timeLabel;
}


-(void)setModel:(BYcitizenModel *)model{
    
    self.timeLabel.text =model.time;
    self.contentLabel.text =model.intro;
    self.numLabel.text =model.title;
    self.conteryLabel.text =model.author;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
